using System;
using System.Collections;
using System.Collections.Generic;
using Newtonsoft.Json;
using FreeRedis;

namespace QQZiFramework
{
    public class RedisConfig
    {
        /// <summary>
        /// redis主机，集群则多个带端口
        /// </summary>
        /// <value></value>
        public string IP { get; set; }
        public int Port { get; set; }
        public string Password { get; set; }

        /// <summary>
        /// 默认数据库
        /// </summary>
        /// <value></value>
        public int Default {get;set;}

        public int MinPool { get; set; }

        public int MaxPool { get; set; }

        public bool Log { get; set; }

        public bool LogGet { get; set; }

        /// <summary>
        /// 连接池中元素的空闲时间（单位为毫秒 20000s）
        /// </summary>
        /// <value></value>

        public int IdleTimeout { get; set; }

        /// <summary>
        /// 连接超时，单位为毫秒（30000 ms）
        /// </summary>
        /// <value></value>
        public int ConnectTimeout {get;set;}

        /// <summary>
        /// 接收超时，单位为毫秒（20000 ms）
        /// </summary>
        /// <value></value>
        public int ReceiveTimeout {get;set;}

        /// <summary>
        /// 发送超时，单位为毫秒（20000 ms）
        /// </summary>
        /// <value></value>
        public int SendTimeout {get;set;}

        public RedisConfig()
        {
            MaxPool = 10000;
            IdleTimeout = 20000;
            ConnectTimeout = 30000;
            ReceiveTimeout = 20000;
            SendTimeout= 20000;
        }
        
    }
}